<template>
  <div>
    <van-tabs>
      <van-tab title="表单信息">
        <div id="SiteSurveyZzd">
          <div v-if="hideMap">
            <div class="content">
              <div class="list">
                <van-form validate-first>
                  <p class="subTitle"><span class="line"></span>申请人信息</p>
                  <div>
                    <van-field clickable name="picker" :value="formDataApply.SEX | inUseName(ENUM.XBARR)" label="性别" placeholder="请选择性别" @click="ENUM.XBARR1 = true" />
                    <van-popup v-model="ENUM.XBARR1" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.XBARR" value-key="DICNAME" @confirm="onConfirm10" @cancel="ENUM.XBARR1 = false" />
                    </van-popup>

                    <van-field v-model="formDataApply.HOUSEAPPLICANT" label="姓名" />

                    <van-field v-model="formDataApply.APPLYPHONE" label="手机号" />

                    <van-field v-model="formDataApply.AGE" label="年龄" />

                    <van-field v-model="formDataApply.CERTIFICATECODE" label="身份证号" />

                    <van-field v-model="formDataApply.PERMANENTADDR" label="户口所在地" />
                  </div>
                  <p class="subTitle"><span class="line"></span>联建人信息</p>
                  <lianjianren :Isshowbutton="false" :rowData="formData" />
                  <p class="subTitle"><span class="line"></span>联建人家庭成员信息</p>
                  <lianjianrenGTXX :Isshowbutton="false" :rowData="formData" />
                  <p class="subTitle"><span class="line"></span>现宅基地及农房情况</p>
                  <van-field v-model="formDataXzdjInfo.X_ZJDMJ" label="宅基地面积(m²)" />
                  <van-field v-model="formDataXzdjInfo.X_JZMJ" label="建筑面积(m²)" />
                  <van-field v-model="formDataXzdjInfo.X_QSZSH" label="权属证书号" />

                  <van-field
                    clickable
                    name="picker"
                    :value="formDataXzdjInfo.X_XZJDCZQK | inUseName(ENUM.ZDJCZRR1)"
                    label="现宅基地处置情况"
                    placeholder="请选择现宅基地处置情况"
                    @click="ENUM.ZDJS1 = true" />
                  <van-popup v-model="ENUM.ZDJS1" position="bottom" get-container="#popup">
                    <van-picker show-toolbar :columns="ENUM.ZDJCZRR1" value-key="DICNAME" @confirm="onConfirm21" @cancel="ENUM.ZDJS1 = false" />
                  </van-popup>
                  <van-field v-if="formDataXzdjInfo.X_XZJDCZQK == '39'" v-model="formDataXzdjInfo.X_XZJDCZQK_QT" label="其他" />

                  <van-field
                    clickable
                    name="picker"
                    :value="formDataXzdjInfo.X_F_IFSILINGYIJIAN | inUseName(ENUM.SFARR)"
                    label="是否涉及四邻意见"
                    placeholder="请选择是否涉及四邻意见"
                    @click="ENUM.ISSLYJ = true" />
                  <van-popup v-model="ENUM.ISSLYJ" position="bottom" get-container="#popup">
                    <van-picker show-toolbar :columns="ENUM.SFARR" value-key="DICNAME" @confirm="onConfirm22" @cancel="ENUM.ISSLYJ = false" />
                  </van-popup>
                  <van-field
                    v-if="formDataXzdjInfo.X_XZJDCZQK != '39'"
                    clickable
                    name="picker"
                    :value="formDataXzdjInfo.XZJDCZQK_JS | inUseName(ENUM.TXJSARR1)"
                    label="间数"
                    placeholder="请选择间数"
                    @click="ENUM.TXJS1 = true" />
                  <van-popup v-model="ENUM.TXJS1" position="bottom" get-container="#popup">
                    <van-picker show-toolbar :columns="ENUM.TXJSARR1" value-key="DICNAME" @confirm="onConfirm20" @cancel="ENUM.TXJS1 = false" />
                  </van-popup>
                  <van-field v-if="formDataXzdjInfo.X_XZJDCZQK != '39'" type="number" :value="formDataXzdjInfo.XZJDCZQK_MJ" label="面积" />
                  <p class="subTitle"><span class="line"></span>家庭成员信息</p>
                  <FramlyData :Isshowbutton="true" :rowData="formData" />
                  <p class="subTitle"><span class="line"></span>踏勘成果</p>
                  <div>
                    <van-field clickable readonly name="picker" :value="formDataXzdjInfo.APPLYTYPE | inUseName(ENUM.JFLXARR)" label="建房类型" placeholder="请选择建房类型" @click="ENUM.JFLX = true" />
                    <van-popup v-model="ENUM.JFLX" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.JFLXARR" value-key="DICNAME" @confirm="onConfirm1" @cancel="ENUM.JFLX = false" />
                    </van-popup>
                    <van-field clickable readonly name="picker" :value="formDataXzdjInfo.YDLX | inUseName(ENUM.YDLXARR)" label="地类" placeholder="请选择地类" @click="ENUM.YDLX = true" />
                    <van-popup v-model="ENUM.YDLX" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.YDLXARR" value-key="DICNAME" @confirm="onConfirm2" @cancel="ENUM.YDLX = false" />
                    </van-popup>
                    <van-field
                      v-if="formDataXzdjInfo.YDLX == 17"
                      clickable
                      readonly
                      name="picker"
                      :value="formDataXzdjInfo.DL_NYD | inUseName(ENUM.NYDARR)"
                      label="农用地"
                      placeholder="请选择农用地"
                      @click="ENUM.NYD = true" />
                    <van-popup v-model="ENUM.NYD" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.NYDARR" value-key="DICNAME" @confirm="onConfirm5" @cancel="ENUM.NYD = false" />
                    </van-popup>
                    <van-field v-if="formDataXzdjInfo.DL_NYD == 106" v-model="formDataXzdjInfo.YDLX_NYD_QT" label="其他" placeholder="请填写其他" />

                    <van-field v-model="formDataXzdjInfo.HOMESTEADAREA" label="宅基地面积(m²)" placeholder="请填写宅基地面积" />

                    <van-field v-model="formDataXzdjInfo.HOUSEFLOORAREA" label="占地面积(m²)" placeholder="请填写占地面积" />

                    <van-field v-model="formDataXzdjInfo.BUILDAREA" label="建筑面积(m²)" placeholder="请填写建筑面积" />

                    <van-field v-model="formDataXzdjInfo.BUILDHEIGHT" label="檐口高度(m)" placeholder="请填写檐口高度" />
                    <van-field
                      readonly
                      clickable
                      name="picker"
                      :value="formDataXzdjInfo.BUILDSTOREY | inUseName(ENUM.YDLXARR1)"
                      label="建筑层数"
                      placeholder="请填写建筑层数"
                      @click="ENUM.YDLX1 = true" />
                    <van-popup v-model="ENUM.YDLX1" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.YDLXARR1" value-key="DICNAME" @confirm="onConfirm19" @cancel="ENUM.YDLX1 = false" />
                    </van-popup>
                    <!-- <van-field v-model="formTKCG.BUILDSTOREY" label="建筑层数(层)1" placeholder="请填写建筑层数" /> -->
                    <van-field type="number" v-model="formDataXzdjInfo.LC_QT" label="楼层_其他" placeholder="楼层_其他" />
                    <van-field v-model="formDataXzdjInfo.DPGD" label="地坪高度(m)" placeholder="地坪高度(m)" />
                    <van-field v-model="formDataXzdjInfo.JZZGD" label="建筑总高度(m)" placeholder="建筑总高度(m)" />
                    <van-field clickable readonly :value="formDataXzdjInfo.WSCLFS | inUseName(ENUM.WSCLFSARR)" label="污水处理方式" placeholder="请填写污水处理方式" @click="ENUM.WSCLFS = true" />
                    <van-popup v-model="ENUM.WSCLFS" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.WSCLFSARR" value-key="DICNAME" @confirm="onConfirm6" @cancel="ENUM.WSCLFS = false" />
                    </van-popup>
                    <van-field clickable readonly :value="formDataXzdjInfo.STRUCTURETYPE | inUseName(ENUM.JGLXARR)" label="结构类型" placeholder="请填写结构类型" @click="ENUM.JGLX = true" />
                    <van-popup v-model="ENUM.JGLX" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.JGLXARR" value-key="DICNAME" @confirm="onConfirm3" @cancel="ENUM.JGLX = false" />
                    </van-popup>

                    <van-field v-model="formDataXzdjInfo.SPACING" label="日照间距" placeholder="请填写日照间距" />

                    <van-field v-model="formDataXzdjInfo.EXTERIORCOLOR" label="外墙色彩" placeholder="请填写外墙色彩" />

                    <van-field v-model="formDataXzdjInfo.EAST" label="东至" placeholder="请填写东至" />

                    <van-field v-model="formDataXzdjInfo.SOUTH" label="南至" placeholder="请填写南至" />

                    <van-field v-model="formDataXzdjInfo.WEST" label="西至" placeholder="请填写西至" />

                    <van-field v-model="formDataXzdjInfo.NORTH" label="北至" placeholder="请填写北至" />

                    <van-field clickable readonly :value="formDataXzdjInfo.XLQLR | inUseName(ENUM.SFARR)" label="是否征得相邻权利人同意" placeholder="请选择" @click="ENUM.SF = true" />
                    <van-popup v-model="ENUM.SF" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ENUM.SFARR" value-key="DICNAME" @confirm="onConfirm4" @cancel="ENUM.SF = false" />
                    </van-popup>
                    <van-field v-model="formDataXzdjInfo.CONSTRUCITONADDRESS" label="地址" placeholder="请填写地址" />
                    <!-- <van-field clickable readonly :value="formDataApply.GHQ | inUseName(ArrayErr1)"
                      label="规划区" placeholder="请选择规划区" @click="ENUM.SFGHQ = true" />
                    <van-popup v-model="ENUM.SFGHQ" position="bottom" get-container="#popup">
                      <van-picker show-toolbar :columns="ArrayErr1" value-key="DICNAME" @confirm="onConfirm7"
                        @cancel="ENUM.SFGHQ = false" />
                    </van-popup> -->
                    <selectPicker
                      :isTime="false"
                      :labels="'规划区'"
                      :values="'GHQVALUE'"
                      :DICID="'GHQKEY'"
                      :placeholder="'请选择规划区'"
                      :selectValue="formDataApply.GHQ | inUseNameGHQ(ArrayErr1)"
                      :columns="ArrayErr1"
                      @getMessage="setValue4"></selectPicker>
                    <selectPicker
                      :isTime="false"
                      :labels="'是否需要补正告知书'"
                      :values="'DICNAME'"
                      :DICID="'DICID'"
                      :placeholder="'请选择是否需要补正告知书'"
                      :selectValue="formNCZJSJTJS.IF_BZGZS | inUseName(ArrayErr)"
                      :columns="ArrayErr"
                      @getMessage="setValue2"></selectPicker>
                    <selectPicker
                      :isTime="false"
                      :values="'DICNAME'"
                      :DICID="'DICID'"
                      :labels="'是否需要条件书'"
                      :placeholder="'请选择是否需要条件书'"
                      :selectValue="formNCZJSJTJS.IF_TJS | inUseName(ArrayErr)"
                      :columns="ArrayErr"
                      @getMessage="setValue3"></selectPicker>
                  </div>
                </van-form>
                <div class="list">
                  <van-form validate-first>
                    <div class="inputWrap">
                      <span style="color: red">*</span>
                      <van-field
                        clickable
                        name="picker"
                        v-model="formDataXzdjInfo.TKRY"
                        label="现场踏勘人员"
                        placeholder="请输入现场踏勘人员"
                        :rules="[{ required: true, message: '请输入现场踏勘人员' }]" />
                    </div>
                    <div class="inputWrap">
                      <span style="color: red">*</span>
                      <van-field
                        readonly
                        clickable
                        name="datetimePicker"
                        :value="formDataXzdjInfo.RECONTIME"
                        label="踏勘时间"
                        placeholder="请选择踏勘时间"
                        :rules="[{ required: true, message: '请选择踏勘时间' }]" />
                      <van-popup v-model="showPickerq" position="bottom">
                        <van-datetime-picker v-model="currentDate" type="date" title="选择年月日" @cancel="showPickerq = false" @confirm="onConfirmRQ" />
                      </van-popup>
                    </div>
                    <div class="inputWrap">
                      <span style="color: red">*</span>
                      <van-field clickable name="picker" v-model="formDataXzdjInfo.ZTR" label="制图人" placeholder="请输入制图人" :rules="[{ required: true, message: '请输入制图人' }]" />
                    </div>
                    <div class="inputWrap">
                      <span style="color: red">*</span>
                      <van-field
                        clickable
                        readonly
                        :value="formDataXzdjInfo.SFXZHQBM ? formDataXzdjInfo.SFXZHQBM : 6 | inUseName(ENUM.SFARR)"
                        label="是否选择踏勘部门"
                        placeholder="请选择"
                        @click="ENUM.SF1 = true" />
                      <van-popup v-model="ENUM.SF1" position="bottom" get-container="#popup">
                        <van-picker show-toolbar :columns="ENUM.SFARR" value-key="DICNAME" @confirm="onConfirm8" @cancel="ENUM.SF1 = false" />
                      </van-popup>
                    </div>
                    <div class="inputWrap" v-if="formDataXzdjInfo.SFXZHQBM == 5">
                      <span style="color: red">*</span>
                      <van-field
                        clickable
                        readonly
                        type="textarea"
                        autosize
                        name="picker"
                        :value="formDataXzdjInfo.HQRYMC | inUseName1(ENUM.TKBMARR)"
                        label="踏勘部门"
                        placeholder="请选择踏勘单位"
                        @click="ENUM.TKBM = true" />
                      <van-popup v-model="ENUM.TKBM" position="bottom">
                        <p class="titleBtn"><span @click="ENUM.TKBM = false" style="color: #969799">取消</span><van-checkbox v-model="checked" @change="toggleAll">全选</van-checkbox></p>
                        <van-checkbox-group ref="checkboxGroup" v-model="HQRYMC" :style="{ height: '40vh', 'overflow-y': 'auto' }">
                          <van-cell-group>
                            <van-cell v-for="(item, index) in ENUM.TKBMARR" clickable :key="index" :title="item.DEPT_NAME" @click="toggle(index)">
                              <template #right-icon>
                                <van-checkbox :name="item.DEPTID" ref="checkboxes" />
                              </template>
                            </van-cell>
                          </van-cell-group>
                        </van-checkbox-group>
                      </van-popup>
                    </div>
                    <el-table :data="tableDataSH" v-if="formDataXzdjInfo.SFXZHQBM == 5" border style="width: 100%; margin: 10px 0">
                      <el-table-column prop="OPINION" label="审核意见"></el-table-column>
                      <el-table-column prop="SIGNDATE" label="审核时间"></el-table-column>
                      <el-table-column prop="SIGNERNAME" label="审核姓名"></el-table-column>
                    </el-table>
                    <div class="inputWrap">
                      <span style="color: red">*</span>
                      <van-field
                        clickable
                        readonly
                        :value="formDataXzdjInfo.SFQY ? formDataXzdjInfo.SFQY : 6 | inUseName(ENUM.SFARR)"
                        label="是否选择测绘单位"
                        placeholder="请选择"
                        @click="ENUM.SF2 = true" />
                      <van-popup v-model="ENUM.SF2" position="bottom" get-container="#popup">
                        <van-picker show-toolbar :columns="ENUM.SFARR" value-key="DICNAME" @confirm="onConfirm9" @cancel="ENUM.SF2 = false" />
                      </van-popup>
                    </div>
                    <div class="inputWrap" v-if="formDataXzdjInfo.SFQY == 5">
                      <span style="color: red">*</span>
                      <van-field
                        clickable
                        readonly
                        type="textarea"
                        autosize
                        name="picker"
                        :value="formDataXzdjInfo.QYDWMC | inUseName2(ENUM.CHBMARR)"
                        label="测绘单位"
                        placeholder="请选择测绘单位"
                        @click="ENUM.CHBM = true" />
                      <van-popup v-model="ENUM.CHBM" position="bottom">
                        <p class="titleBtn"><span @click="ENUM.CHBM = false" style="color: #969799">取消</span><van-checkbox v-model="checked1" @change="toggleAll1">全选</van-checkbox></p>
                        <van-checkbox-group ref="checkboxGroup1" v-model="QYDWMC" :style="{ height: '40vh', 'overflow-y': 'auto' }">
                          <van-cell-group>
                            <van-cell v-for="(item, index) in ENUM.CHBMARR" clickable :key="index" :title="item.COMAPNY_NAME" @click="toggle1(index)">
                              <template #right-icon>
                                <van-checkbox :name="item.TYSHXYDM" ref="checkboxes1" />
                              </template>
                            </van-cell>
                          </van-cell-group>
                        </van-checkbox-group>
                      </van-popup>
                    </div>
                    <div v-show="formNCZJSJTJS.IF_TJS == '5'">
                      <p class="subTitle"><span class="line"></span>农村住宅设计条件书</p>
                      <van-field v-model="formNCZJSJTJS.HOUSEAPPLICANT" label="户主名称" placeholder="请输入内容" />
                      <van-field v-model="formNCZJSJTJS.HKQK" label="户口情况" placeholder="请输入内容" />
                      <van-field v-model="formData.CONSTRUCITONADDRESS" label="建房地址" placeholder="请输入内容" />
                      <van-field v-model="formNCZJSJTJS.JTRY" label="家庭成员" placeholder="请输入内容" />
                      <van-field v-model="formData.BUILDAREA" label="用地面积≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m²</div>
                        </template>
                      </van-field>
                      <van-field v-model="formData.HOUSEFLOORAREA" label="建筑面积≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m²</div>
                        </template>
                      </van-field>
                      <van-field v-model="formData.BUILDHEIGHT" label="申请建筑高度≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template></van-field
                      >
                      <van-field v-model="formNCZJSJTJS.NWGC" label="室内外高度差≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.WMXS" label="屋面形式" placeholder="请输入内容" />
                      <van-field v-model="formNCZJSJTJS.JZWLMFG" label="建筑外立面风格" placeholder="请输入内容" />
                      <van-field v-model="formNCZJSJTJS.YCGD" label="一层高≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.ESCGD" label="二层高≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.SSCGD" label="三层高≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.SWCGD" label="四层高≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.WLCGD" label="五层高≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.LC" label="六层高≤" placeholder="请输入内容">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.DPBG" label="底层室内地坪标高" placeholder="请填写底层室内地坪标高">
                        <template #button>
                          <div style="color: black">m</div>
                        </template>
                      </van-field>
                      <van-field v-model="formNCZJSJTJS.JBRYJ" label="经办人意见" placeholder="请填写经办人意见" />
                      <!-- <van-field v-model="formNCZJSJTJS.SPSJ3" label="条件书审批时间" placeholder="条件书审批时间" /> -->
                      <selectPicker :isTime="true" :labels="'条件书审批时间'" :placeholder="'请选择条件书审批时间'" :selectValue="formNCZJSJTJS.SPSJ3" @getMessage="setValue1"></selectPicker>
                      <div class="inputWrap">
                        <van-field readonly clickable name="picker" v-model="formNCZJSJTJS.JBRQM" label="经办人" />
                      </div>
                    </div>
                    <div style="position: relative" v-show="formNCZJSJTJS.IF_BZGZS == '5'">
                      <p class="subTitle"><span class="line"></span>补正告知书</p>
                      <el-table size="small" :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange10">
                        <el-table-column type="selection" width="30"> </el-table-column>
                        <el-table-column v-for="(it, in1) in tablecoums" :key="in1" :prop="it.prop" :label="it.name" align="center"> </el-table-column>
                      </el-table>
                      <van-button type="info" size="small" style="position: absolute; top: 10px; left: 254px" @click="handleAddusers('添加')">添加</van-button>
                      <van-button type="info" size="small" style="position: absolute; top: 10px; left: 304px" @click="handleAddusers('删除')">删除</van-button>
                    </div>
                    <div v-if="isShow">
                      <p class="subTitle"><span class="line"></span>审核情况</p>
                      <div class="inputWrap">
                        <span style="color: red">*</span>
                        <van-field clickable name="picker" v-model="ISSign" label="是否签到" :rules="[{ required: true, message: '请输入踏勘结果' }]" />
                      </div>

                      <!-- <div class="inputWrap">
                        <span style="color: red">*</span>
                         <van-field clickable name="picker" v-model="formTKCG.TKJG" label="踏勘结果" placeholder="请输入踏勘结果"
                          :rules="[{ required: true, message: '请输入踏勘结果' }]" />
                      </div>
                      <div class="inputWrap">
                        <span style="color: red">*</span>
                        <van-field clickable name="picker" v-model="formDataTKYJ.OPINION" label="踏勘意见"
                          placeholder="请输入踏勘意见" :rules="[{ required: true, message: '请输入踏勘意见' }]" />
                      </div>
                      <div class="inputWrap">
                        <span style="color: red">*</span>
                        <van-field  clickable name="picker" v-model="formDataTKYJ.SIGNERNAME" label="审核人" />
                      </div>
                      <div class="inputWrap">
                        <span style="color: red">*</span>
                        <van-field readonly clickable name="picker" v-model="formDataTKYJ.SIGNDATE" label="审核时间" />
                      </div> -->
                      <div class="iinputWrap" style="position: relative">
                        <span style="color: red">*踏勘意见</span>
                        <el-table size="small" :data="tableDataTKYJ" border style="width: 100%; margin-top: 50px" @selection-change="handleSelectionChange11">
                          <el-table-column type="selection" width="30"> </el-table-column>
                          <el-table-column v-for="(it, in1) in tablecoumTKYJ" :key="in1" :prop="it.prop" :label="it.name" align="center"> </el-table-column>
                        </el-table>
                        <van-button type="info" size="small" style="position: absolute; top: 10px; left: 204px" @click="handleAddTKYJ('添加')">添加</van-button>
                        <van-button type="info" size="small" style="position: absolute; top: 10px; left: 254px" @click="handleAddTKYJ('修改')">修改</van-button>
                        <van-button type="info" size="small" style="position: absolute; top: 10px; left: 314px" @click="handleAddTKYJ('删除')">删除</van-button>
                      </div>
                    </div>
                  </van-form>
                </div>
                <p class="subTitle"><span class="line"></span>踏勘宅基地坐落平面位置图</p>
                <!-- 上传红线图 -->
                <span style="color: red">备注: 建议上传的宅基地坐落平面位置图为A4格式，最大宽度为210毫米(2480px) ，最大高度为297毫米 (3508px)。</span>
                <base64Upload v-if="tkRowGuid != ''" :typeParam="'true'" :tkRowGuid="tkRowGuid" :FJData="HXT" tkRowGuid="tk" :ROW_GUID="formDataXzdjInfo" :ROW_GUID1="formData" />
                <p class="subTitle"><span class="line"></span>材料项</p>
                <upLoad
                  v-if="tkRowGuid != ''"
                  :typeParam="'true'"
                  :tkRowGuid="tkRowGuid"
                  :rowData="formData"
                  :FJData="fileData"
                  :isReadOnly="false"
                  :SHITUID="'98bcf528966e48ce896a8b3fd02d45d5'"
                  :UpLoadID="'7a3fc061c866434b8475d3775c9ddcea'" />
                <div v-for="(item, index) in fileData.slice(6, 8)" :key="item.name" style="border-bottom: 1px solid #ebedf0">
                  <p style="font-size: 14px; font-weight: bold; line-height: 5vh; color: #646566">
                    {{ item.name }}
                  </p>
                  <template v-if="item.fileList.length > 0">
                    <span
                      v-for="(items, index) in item.fileList"
                      @click="fileOpen(items)"
                      :key="index"
                      style="display: inline-block; padding-bottom: 10px; color: #3f8ffc; text-decoration: underline"
                      >{{ items.FILENAME }}</span
                    >
                  </template>
                  <template v-else>
                    <span style="display: inline-block; padding-bottom: 10px">暂无附件</span>
                  </template>
                </div>
              </div>
              <div style="position: relative">
                <p class="subTitle"><span class="line"></span>补正文件</p>

                <upLoad
                  v-if="tkRowGuid != ''"
                  :IsBZWJ="true"
                  :rowData="formData"
                  :FJData="fileDataBZWJ"
                  :isReadOnly="false"
                  :SHITUID="'98bcf528966e48ce896a8b3fd02d45d5'"
                  :UpLoadID="'7a3fc061c866434b8475d3775c9ddcea'" />
                <div v-for="(item, index) in fileDataBZWJ.slice(6, 8)" :key="item.name" style="border-bottom: 1px solid #ebedf0">
                  <p style="font-size: 14px; font-weight: bold; line-height: 5vh; color: #646566">
                    {{ item.name }}
                  </p>
                  <template v-if="item.fileList.length > 0">
                    <span
                      v-for="(items, index) in item.fileList"
                      @click="fileOpen(items)"
                      :key="index"
                      style="display: inline-block; padding-bottom: 10px; color: #3f8ffc; text-decoration: underline"
                      >{{ items.FILENAME }}</span
                    >
                  </template>
                  <template v-else>
                    <span style="display: inline-block; padding-bottom: 10px">暂无附件</span>
                  </template>
                </div>
                <!-- <el-table size="small" :data="tableDataBZWJ" border style="width: 100%"
                  @selection-change="handleSelectionChange11">
                  <el-table-column type="selection" width="30"> </el-table-column>
                  <el-table-column v-for="(it, in1) in tablecoumsBZWj" :key="in1" :prop="it.prop" :label="it.name"
                    align="center"> </el-table-column>
                </el-table>
                <van-button type="info" size="small" style="position: absolute; top: 10px; left: 254px"
                  @click="handleAddBZWJ('添加')">添加</van-button>
                <van-button type="info" size="small" style="position: absolute; top: 10px; left: 304px"
                  @click="handleAddBZWJ('删除')">删除</van-button> -->
              </div>
              <!-- <div style="position: relative">
                <p class="subTitle"><span class="line"></span>审核情况</p>
                <el-table size="small" :data="tableData" border style="width: 100%"
                  @selection-change="handleSelectionChange10">
                  <el-table-column type="selection" width="30"> </el-table-column>
                  <el-table-column v-for="(it, in1) in tablecoums" :key="in1" :prop="it.prop" :label="it.name"
                    align="center"> </el-table-column>
                </el-table>
                <van-button type="info" size="small" style="position: absolute; top: 10px; left: 254px"
                  @click="handleAddusers('添加')">添加</van-button>
                <van-button type="info" size="small" style="position: absolute; top: 10px; left: 304px"
                  @click="handleAddusers('删除')">删除</van-button>
              </div> -->
            </div>
            <div class="footer">
              <van-button style="margin-right: 10px" size="small" type="info" @click="getinsertDataView">提交</van-button>
              <van-button style="margin-right: 10px" size="small" type="info" @click="saveInfo()">保存</van-button>
              <van-button style="margin-right: 10px" size="small" type="info" @click="blackTable">退回</van-button>
              <van-button style="margin-right: 10px" size="small" type="info" @click="getDituUrl">地图</van-button>
              <van-button style="margin-right: 10px" size="small" type="info" @click="getSignIn">签到</van-button>
            </div>
          </div>
          <div v-else>
            <div class="title">
              <span @click="onClickLeft" style="position: absolute; left: 5px; display: flex; align-items: center; font-size: 14px"> <van-icon name="arrow-left" />返回 </span>
              农房一张图
            </div>
            <div style="width: 100%; height: calc(100vh - 50px)">
              <iframe style="width: 100%; height: 100%" :src="MapUrl"></iframe>
            </div>
          </div>
        </div>
      </van-tab>
      <van-tab title="过程信息">
        <FileData :ROW_GUID="formData.ROW_GUID" :rowData="formData"></FileData>
      </van-tab>
    </van-tabs>
    <van-dialog v-model="isShow10" :title="'新增'" show-cancel-button @confirm="saveBtn" @cancel="cancelBtn">
      <van-form validate-first>
        <div style="padding: 10px">
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field v-model="formData19.CLMC" :required="true" label="材料名称" placeholder="请输入材料名称" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field name="validator" v-model="formData19.YJFYJ" :required="true" label="原件/复印件" placeholder="请输入原件/复印件" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field name="validator" v-model="formData19.FS" :required="true" label="份数" placeholder="请输入份数" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field name="validator" v-model="formData19.BZ" :required="true" label="备注" placeholder="请输入备注" />
          </div>
        </div>
      </van-form>
    </van-dialog>
    <van-dialog v-model="isShow11" :title="'新增'" show-cancel-button @confirm="saveBtnTKYJ" @cancel="cancelBtnTKYJ">
      <van-form validate-first>
        <div style="padding: 10px">
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field v-model="formDataTKYJ.OPINION" :required="true" label="踏勘意见" placeholder="请输入踏勘意见" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field name="validator" v-model="formDataTKYJ.SIGNERNAME" :required="true" label="审核人" placeholder="请输入审核人" />
          </div>
          <div style="display: flex; justify-content: center; align-items: center; border-bottom: 1px solid #d2d2d2; color: black">
            <van-field clickable name="datetimePicker" :value="formDataTKYJ.SIGNDATE" label="审核时间" placeholder="请选择审核时间" />
            <!-- <selectPicker :isTime="true" :labels="'审核时间'"  :selectValue="formDataTKYJ.SIGNDATE" @getMessage="setValue5"></selectPicker> -->
            <!-- <van-field name="validator" v-model="formDataTKYJ.SIGNDATE" :required="true" label="审核时间"
              placeholder="请输入审核时间" /> -->
          </div>
        </div>
      </van-form>
    </van-dialog>
  </div>
</template>
<script>
import {
  updateDataView,
  FileServerUpload,
  InsertDataView,
  dataServerOpenDataView,
  CreateProcessAndSendTask,
  GetFileData,
  DelectFile,
  QuerySignCallback,
  FileServerProxy,
  dataTransFile,
  dataTransFilePreview,
  farmhouseNumberApply,
  IfMapToResult
} from '../../../utils/api'
import dd from 'gdt-jsapi'
import selectPicker from '@/utils/selectPicker'
import { GSA_Add, GSA_Search } from '@/common/commonApi'
import { v4 as uuidv4 } from 'uuid'
import FileData from '@/components/activity/FileData'
import upLoad from '../../../utils/upLoad'
import lianjianren from './lianjianren.vue'
import lianjianrenGTXX from './lianjianrenGTXX.vue'
import base64Upload from '@/utils/base64Upload'
import FramlyData from './FramlyData.vue'
export default {
  data() {
    return {
      showZDZLQL: '',
      isShow10: false,
      isShow11: false,
      isADDNCSJTJS: false,
      formData1: {},
      HQRYMC: [],
      QYDWMC: [],
      hideMap: true,
      buildstorey: '',
      MapUrl: '',
      ArrayErr: [
        // {
        //   DICID: '5',
        //   DICNAME: '是'
        // },
        // {
        //   DICID: '6',
        //   DICNAME: '否'
        // }
      ],
      ArrayErr1: [
        // {
        //   DICID: '100',
        //   DICNAME: '城镇规划区'
        // },
        // {
        //   DICID: '101',
        //   DICNAME: '乡村规划区'
        // },
        // {
        //   DICID: '102',
        //   DICNAME: '未编制规划区'
        // }
      ],
      NYD: '',
      ISSign: '否',
      formData19: {
        CLMC: '',
        YJFYJ: '',
        FS: '',
        BZ: ''
      },
      tableData: [],
      tableDataBZWJ: [],
      tablecoumsBZWj: [{}],
      tableDataTKYJ: [],
      tablecoumTKYJ: [
        {
          name: '审核意见',
          prop: 'OPINION'
        },
        {
          name: '审核时间',
          prop: 'SIGNERNAME'
        },
        {
          name: '审核人',
          prop: 'SIGNDATE'
        }
      ],
      tablecoums: [
        {
          name: '材料名称',
          prop: 'CLMC'
        },
        {
          name: '原件/复印件',
          prop: 'YJFYJ'
        },
        {
          name: '份数',
          prop: 'FS'
        },
        {
          name: '备注',
          prop: 'BZ'
        }
      ],
      formNCZJSJTJS: {},
      multipleSelection10: [],
      multipleSelection11: [],
      DL: '',
      JFLX: '',
      className: '',
      columns1: ['建设用地', '未利用地', '农用地'],
      showPicker1: false,
      showPicker2: false,
      showPicker3: false,
      checked: false,
      checked1: false,
      //存储需要传给treeSelect组件的值
      formData: {
        DZ: ''
      },
      formTKCG: {},
      showPickerq: false,
      minDate: new Date(2020, 0, 1),
      maxDate: new Date(2025, 10, 1),
      currentDate: new Date(),
      fileList: [],
      isShow: true,
      isADD1: false,
      ENUM: {
        XB: false,
        YDLX1: false,
        TXJS1: false,
        ZDJS1: false,
        XBARR1: false,
        ISSLYJ: false,
        XBARR: [],
        SF: false,
        SF1: false,
        SF2: false,
        SFGHQ: false,
        SFARR: [],
        NYD: false,
        NYDARR: [],
        JFLX: false,
        JFLXARR: [],
        YDLX: false,
        YDLXARR: [],
        JGLX: false,
        JGLXARR: [],
        WSCLFS: false,
        WSCLFSARR: [],
        TKBM: false,
        TKBMARR: [],
        CHBM: false,
        CHBMARR: [],
        YDLXARR1: [],
        TXJSARR1: [],
        ZDJCZRR1: []
      },
      HXT: [
        {
          title: '红线图',
          FileName: [],
          groupGuid: 'c34eb13b-b0e0-4c40-9be8-d69d39360d73',
          fileList: []
        }
      ],
      fileData: [
        {
          title: '宅基地坐落平面位置图',
          FileName: [],
          groupGuid: 'be6c2622-e00f-49ca-b59d-2550fa62fef6',
          fileList: []
        },
        {
          title: '红线图',
          FileName: [],
          groupGuid: 'c34eb13b-b0e0-4c40-9be8-d69d39360d73',
          fileList: []
        },
        {
          title: '踏勘照片1',
          FileName: [],
          groupGuid: '39150119-0da6-494a-b1e9-4bed532fecfd',
          fileList: []
        },
        {
          title: '踏勘照片2',
          FileName: [],
          groupGuid: 'fb00616c-0c03-41dc-b00b-84d3efe3af87',
          fileList: []
        },
        {
          title: '踏勘照片3',
          FileName: [],
          groupGuid: '7cb50c01-d2e1-4119-a0b6-b0443daca71e',
          fileList: []
        },
        {
          title: '其他材料',
          FileName: [],
          groupGuid: '7eb18ff0-5fe4-47ea-a805-68d7731e2609',
          fileList: []
        }
        // {
        //   title: '坐标串',
        //   FileName: [],
        //   groupGuid: 'b6ae9a58-76e4-42c6-94df-0a18a0af0cbf',
        //   fileList: []
        // },
        // {
        //   title: '坐标文件',
        //   FileName: [],
        //   groupGuid: 'ad2bd6ce-ff46-4a19-a6b1-cfc0bbd64daf',
        //   fileList: []
        // }
      ],
      fileDataBZWJ: [
        {
          title: '补正文件',
          FileName: [],
          groupGuid: '123',
          fileList: []
        }
      ],
      columns2: ['耕地', '林地', '草地', '其他'],
      columns3: ['原址翻建', '改扩建', '异址新建'],
      isSaveFile: false,
      tableDataSH: [],
      sexName: '',
      formDataApply: {
        SEX: '',
        HOUSEAPPLICANT: '',
        APPLYPHONE: '',
        AGE: '',
        CERTIFICATECODE: '',
        PERMANENTADDR: '',
        formDataApply: '',
        GHQ: ''
      },
      tkRowGuid: '',
      formDataXzdjInfo: {
        TO_ROW_GUID: '',
        PKID: '',
        X_ZJDMJ: '',
        X_JZMJ: '',
        X_QSZSH: '',
        X_XZJDCZQK: '',
        X_F_IFSILINGYIJIAN: '',
        X_XZJDCZQK_QT: '',
        XZJDCZQK_JS: '',
        XZJDCZQK_MJ: '',
        APPLYTYPE: '',
        YDLX: '',
        HOMESTEADAREA: '',
        DL_NYD: '',
        YDLX_NYD_QT: '',
        HOUSEFLOORAREA: '',
        BUILDAREA: '',
        BUILDHEIGHT: '',
        BUILDSTOREY: '',
        LC_QT: '',
        DPGD: '',
        JZZGD: '',
        WSCLFS: '',
        STRUCTURETYPE: '',
        SPACING: '',
        EXTERIORCOLOR: '',
        EAST: '',
        SOUTH: '',
        WEST: '',
        NORTH: '',
        XLQLR: '',
        CONSTRUCITONADDRESS: '',
        IF_BZGZS: '',
        IF_TJS: '',
        GHQ: '',
        TKRY: '',
        RECONTIME: '',
        ZTR: ''
      },
      isAppltState: '',
      iszjdState: '',
      isTKYJState: '',
      formDataTKYJ: {
        OPINION: '',
        SIGNDATE: '',
        SIGNERNAME: ''
      }
    }
  },
  watch: {
    QYDWMC() {
      this.formDataXzdjInfo.QYDWMC = this.QYDWMC
    },
    HQRYMC() {
      debugger
      this.formDataXzdjInfo.HQRYMC = this.HQRYMC
    }
  },
  filters: {
    inUseNameGHQ: function (msg, data) {
      try {
        debugger
        let name = ''
        data.forEach((item) => {
          if (item.GHQKEY == msg) {
            name = item.GHQVALUE
          }
        })
        return name
      } catch (err) {}
    },
    inUseName: function (msg, data) {
      try {
        let name = ''
        data.forEach((item) => {
          if (item.DICID == msg) {
            name = item.DICNAME
          }
        })
        return name
      } catch (err) {}
    },
    inUseName1: function (msg, data) {
      try {
        let arr1 = []
        data.forEach((item) => {
          msg.forEach((items) => {
            if (item.DEPTID == items) {
              arr1.push(item.DEPT_NAME)
            }
          })
        })
        return arr1.join(',')
      } catch (err) {}
    },
    inUseName2: function (msg, data) {
      try {
        let arr1 = []
        data.forEach((item) => {
          msg.forEach((items) => {
            if (item.ST_ID == items) {
              arr1.push(item.ST_NAME)
            }
          })
        })
        return arr1.join(',')
      } catch (err) {}
    }
  },
  mounted() {
    //获取字典值
    this.getEnum('86d6eb80-8bcb-49f6-b5c3-462ac1ae585d')
    this.getEnum('a8e5782d-9a59-48e4-b35b-654b9bb667ca')
    this.getEnum('52215e71-341a-452b-8823-a8d4aae058ab')
    this.getEnum('db35edee-88e0-4fae-b14a-868ed4beb1d9')
    this.getEnum('d2ec96d4-b5bc-404a-a9f1-34db915c694b')
    this.getEnum('b65d1943-66f4-49b1-b759-cd9f079dc0d3')
    this.getEnum('f7f359ad-369c-4bf4-892c-294dceb5edef')
    this.getEnum('32770c76-c253-4f1a-968f-aa9e53942db9')
    this.getEnum('d4d925da-cfd1-4608-94bb-24789720de0a')
    this.getEnum('9b7e6eba-f7a0-4684-b820-8357dd92ae32')
    this.getEnum('a892e0f4-5fd6-42b4-b6c2-6e1fc5ebb5dc')
    this.getEnum('d9d4db60-e2f0-429f-b6c7-5cb1e9e6bb2d')
    this.getEnum('2c478392-9c1b-40da-b941-41e4b8c9d6d3')
    this.formData = JSON.parse(this.$route.query.data)
    console.log(this.formData,'this.formDatathis.formDatathis.formDatathis.formData')
    this.formDataTKYJ.SIGNDATE = this.getNowTime().split(' ')[0]
    this.formDataTKYJ.SIGNERNAME = JSON.parse(window.localStorage.getItem('userName')).userName
    //this.getGHQ()
    //获取现宅基地情况
    // this.getJJDData()
    // this.formTKCG.GHQ = this.formData.GHQ
    // if (this.formData.NODE_GUID === '{67241083-CA60-43FC-B1C1-1F4A2D133184}') {
    //   this.isShowTop = false
    // } else {
    //   this.isShowTop = true
    // }
    this.rowGuid = this.newGuid()
    this.formDataXzdjInfo.SFXZHQBM = '5'
    //wjh 2023  8-23 重新书写现场踏勘逻辑
    //申请人信息
    this.getAppltInfo()
    //现宅基地及农房情况
    this.getXZDDIInfo()
    //获取踏勘成果 审核情况
    // ////获取补正告知书、获取农村住宅设计条件告知书
    this.getNCSJTJS()
    //获取踏勘部门
    this.getTKList()
    //获取企业
    this.getTKQYInfo()
    //获取踏勘意见
    this.getTKYJ()
    // this.getTKCG()
    // //获取附件
    // this.getFile()
    // //this.getIFSILINGYIJIAN()
    // //获取是否已签到接口
    // this.getSignInData()

    // //补正告知书
    this.getTableData()
    // //获取家庭成员信息
    // this.getNCData()
    // this.getXianOpenDataView()
    // this.formData.STRUCTURETYPE
    if (ZWJSBridge) {
      ZWJSBridge.setTitle({
        title: '现场踏勘'
      })
        .then((res) => {})
        .catch((err) => {})
        .catch((err) => {})
    }
  },
  methods: {
    //申请人信息
    getAppltInfo: async function () {
      debugger
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
        params: {
          dataguid: 'ca9e63d7-6f89-4125-80f8-d61aab3dfb01',
          searchObject: JSON.stringify([{ field: 'ROW_GUID', value: this.formData.ROW_GUID, operator: '=' }])
        }
      }
      const res = await FileServerProxy(params)
      if (JSON.parse(res.data.data) && JSON.parse(res.data.data).Data.length > 0) {
        //有数据自动回显
        this.formDataApply = JSON.parse(res.data.data).Data[0]
        this.formDataApply.GHQ = 101
        this.isAppltState = 'edit'
      } else {
        //没有数据赋值当前行数据
        this.formDataApply = this.formData
        this.isAppltState = 'add'
      }
    },
    //现宅基地农房处置情况
    async getXZDDIInfo() {
      debugger

      let me = this

      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
        params: {
          dataguid: 'a0e224e8-36be-4591-b770-30cabda3514a',
          searchObject: JSON.stringify([{ field: 'TO_ROW_GUID', value: me.formData.ROW_GUID, operator: '=' }])
        }
      }
      const res = await FileServerProxy(params)
      if (JSON.parse(res.data.data) && JSON.parse(res.data.data).Data.length > 0) {
        //有数据自动回显
        me.formDataXzdjInfo = JSON.parse(res.data.data).Data[0]
        me.tkRowGuid = JSON.parse(res.data.data).Data[0].ROW_GUID
        if(JSON.parse(res.data.data).Data[0].HXT){
          me.HXT[0].fileList.push({
          url: 'data:image/jpeg;base64,' + JSON.parse(res.data.data).Data[0].HXT,
          isImage: true
        })
        }

        if (JSON.parse(res.data.data).Data[0].HQBM) {
          me.HQRYMC = JSON.parse(res.data.data).Data[0].HQBM
            ? JSON.parse(res.data.data)
                .Data[0].HQBM.split(',')
                .map((i) => {
                  return parseInt(i)
                })
            : []
        }
        if (JSON.parse(res.data.data).Data[0].QYDWID) {
          me.QYDWMC = JSON.parse(res.data.data).Data[0].QYDWID
            ? JSON.parse(res.data.data)
                .Data[0].QYDWID.split(',')
                .map((i) => {
                  return parseInt(i)
                })
            : []
        }
        this.iszjdState = 'edit'
      } else {
        this.tkRowGuid = this.newGuid()
        this.formDataXzdjInfo.ROW_GUID = this.tkRowGuid
        //没有数据赋值当前行数据
        let params1 = {
          accessCode: '688bd3883572440a859dfd8ba9194e7b',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
          params: {
            dataguid: '7a676879-10c7-41eb-88c0-2beb7b111158',
            searchObject: JSON.stringify([{ field: 'ROW_GUID', value: this.formData.ROW_GUID, operator: '=' }])
          }
        }
        const res1 = await FileServerProxy(params1)
        if (JSON.parse(res1.data.data) && JSON.parse(res1.data.data).Data.length > 0) {
          //有数据自动回显
          let result = JSON.parse(res1.data.data).Data[0]
          this.formDataXzdjInfo.X_ZJDMJ = result.ZJDMJ
          this.formDataXzdjInfo.X_JZMJ = result.JZMJ
          this.formDataXzdjInfo.X_QSZSH = result.QSZSH
          this.formDataXzdjInfo.X_XZJDCZQK = result.XZJDCZQK
          this.formDataXzdjInfo.X_XZJDCZQK_QT = result.XZJDCZQK_QT
          this.formDataXzdjInfo.XZJDCZQK_JS = result.XZJDCZQK_JS
          this.formDataXzdjInfo.XZJDCZQK_MJ = result.XZJDCZQK_MJ
          this.formDataXzdjInfo.X_F_IFSILINGYIJIAN = result.SFSJSLYJ
          this.formDataXzdjInfo.DPGD = result.DPGD
          this.formDataXzdjInfo.JZZGD = result.JZZGD
        }
        let params2 = {
          accessCode: '688bd3883572440a859dfd8ba9194e7b',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
          params: {
            dataguid: 'fa49247c-7e3c-452c-8f6b-79028187fb5a',
            searchObject: JSON.stringify([{ field: 'ROW_GUID', value: this.formData.ROW_GUID, operator: '=' }])
          }
        }
        const res2 = await FileServerProxy(params2)
        if (JSON.parse(res2.data.data) && JSON.parse(res2.data.data).Data.length > 0) {
          //有数据自动回显
          let result = JSON.parse(res2.data.data).Data[0]
          this.formDataXzdjInfo.APPLYTYPE = result.BUILDTYPE
          this.formDataXzdjInfo.YDLX = result.LANDTYPE
          this.formDataXzdjInfo.HOMESTEADAREA = result.HOMESTEADAREA
          this.formDataXzdjInfo.DL_NYD = result.YDLX_NYD
          this.formDataXzdjInfo.YDLX_NYD_QT = result.YDLX_NYD_QT
          this.formDataXzdjInfo.HOUSEFLOORAREA = result.HOUSEFLOORAREA
          this.formDataXzdjInfo.BUILDAREA = result.BUILDAREA
          this.formDataXzdjInfo.BUILDHEIGHT = result.BUILDHEIGHT
          this.formDataXzdjInfo.BUILDSTOREY = result.BUILDSTOREY
          this.formDataXzdjInfo.WSCLFS = result.SEWAGEDISPOSAL
          this.formDataXzdjInfo.STRUCTURETYPE = result.STRUCTURETYPE
          this.formDataXzdjInfo.SPACING = result.SUNSHINEDIST
          this.formDataXzdjInfo.EXTERIORCOLOR = result.WALLCOLOR
          this.formDataXzdjInfo.EAST = result.DZ
          this.formDataXzdjInfo.SOUTH = result.NZ
          this.formDataXzdjInfo.WEST = result.XZ
          this.formDataXzdjInfo.NORTH = result.BZ
          this.formDataXzdjInfo.XLQLR = result.ADJACENTOPINION
        }
        //自动获取踏勘人 踏勘时间
        this.formDataXzdjInfo.TKRY = JSON.parse(window.localStorage.getItem('userName')).userName
        this.formDataXzdjInfo.RECONTIME = this.getNowTime().split(' ')[0]
        this.formDataXzdjInfo.ZTR = JSON.parse(window.localStorage.getItem('userName')).userName
        // this.formDataXzdjInfo.TKRY ? '' : (this.formDataXzdjInfo.TKRY = JSON.parse(window.localStorage.getItem('userName')).userName)
        // this.formTKCG.ZTR ? '' : (this.formTKCG.ZTR = JSON.parse(window.localStorage.getItem('userName')).userName)
        // this.formTKCG.SHSJ = this.formTKCG.SHSJ ? this.formTKCG.SHSJ.split(' ')[0] : this.getNowTime().split(' ')[0]
        // this.formTKCG.RECONTIME = this.formTKCG.RECONTIME ? this.formTKCG.RECONTIME.split(' ')[0] : this.getNowTime().split(' ')[0]
        this.iszjdState = 'add'
      }
    },
    //获取踏勘部门
    async getTKList() {
      var city = ''
      var me = this
      if (me.formData.BUILDTYPE == 14) {
        city = me.formData.SSZZ
      } else {
        city = me.formData.TOWN
      }
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
        params: {
          dataguid: '63f488ed-f43d-4166-915b-71d7af7fed2f',
          searchObject: JSON.stringify([{ field: 'ZJCITYCODE', value: city, operator: '=' }])
        }
      }
      const res = await FileServerProxy(params)
      if (JSON.parse(res.data.data) && JSON.parse(res.data.data).Data.length > 0) {
        debugger
        me.ENUM.TKBMARR = JSON.parse(res.data.data).Data
      }
    },
    //获取踏勘意见
    async getTKYJ() {
      debugger
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
        params: {
          dataguid: 'd0146d58-57cb-4346-ab33-ff082c3c5ad6',
          searchObject: JSON.stringify([{ field: 'TODATA_GUID', value: this.formData.ROW_GUID, operator: '=' }])
        }
      }
      const res = await FileServerProxy(params)
      debugger
      if (JSON.parse(res.data.data) && JSON.parse(res.data.data).Data.length > 0) {
        this.tableDataTKYJ = JSON.parse(res.data.data).Data
        // this.formDataTKYJ = JSON.parse(res.data.data).Data[0];
        this.isTKYJState = 'edit'
      } else {
        //赋值
        this.formDataTKYJ.SIGNERNAME = JSON.parse(window.localStorage.getItem('userName')).userName
        this.formDataTKYJ.SIGNDATE = this.getNowTime().split(' ')[0]
        this.isTKYJState = 'add'
      }
    },
    //获取企业
    async getTKQYInfo() {
      var city = ''
      var me = this
      if (me.formData.SQFS == 35) {
        city = me.formData.S
      } else {
        city = me.formData.SCITY
      }
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
        params: {
          dataguid: '69f6523e-0a8e-41bc-89f2-48573b917a77',
          searchObject: JSON.stringify([
            { field: 'FWQY', value: city, operator: '=' },
            {
              field: 'FWLX',
              value: 448
            }
          ])
        }
      }
      const res = await FileServerProxy(params)
      if (JSON.parse(res.data.data) && JSON.parse(res.data.data).Data.length > 0) {
        debugger
        me.ENUM.CHBMARR = JSON.parse(res.data.data).Data
      }
    },

    //新保存
    async saveInfo(type) {
      debugger
      let me = this
      //保存农房码
      if (!me.formDataApply.FAMILYHOUSEID) {
        let parmes = {
          accessCode: '170a7b62da0a48ab8bdb19ae81d85b45',
          appKey: '6738b790-69e8-11ec-a673-6805cab640z6',
          cityCode: me.formData.TOWN,
          businessId: me.formData.ROW_GUID
        }
        const res = await farmhouseNumberApply(parmes)
        if (res.data.code == 200) {
          //更新

          let paramss = {
          accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataGuid: '01103ebf-a884-4282-b996-78dd64196946',
            strParams: JSON.stringify([{"PKID":me.formDataApply.PKID,"FAMILYHOUSEID":res.data.data}]),
            token: window.localStorage.getItem('token')
          }
        }
        FileServerProxy(paramss).then((item) => {
          //resolve(item)
        })
          //this.formDataApply.FAMILYHOUSEID = res.data.data
        } else {
          this.$toast.fail('生成农房码失败')
          return
        }
      }
      function p1(){
      return  new Promise((resolve, reject) => {
        //保存申请人信息
        let params = {
          accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataGuid: 'ca9e63d7-6f89-4125-80f8-d61aab3dfb01',
            strParams: JSON.stringify([me.formDataApply]),
            token: window.localStorage.getItem('token')
          }
        }
        FileServerProxy(params).then((item) => {
          resolve(item)
        })
      }).catch()
      }
      //let p1 =

      function p2(){
      return   new Promise((resolve, reject) => {
        //保存现宅地基
        me.formDataXzdjInfo.TO_ROW_GUID = me.formData.ROW_GUID
        if (me.iszjdState == 'add') {
          if (me.formDataXzdjInfo.HQRYMC) {
            let HQRYMCs = []
            let HQMBs = []
            if (typeof me.formDataXzdjInfo.HQRYMC == 'string') {
              me.formDataXzdjInfo.HQRYMC = me.formDataXzdjInfo.HQRYMC.split(',')
            }
            me.ENUM.TKBMARR.forEach((items) => {
              me.formDataXzdjInfo.HQRYMC.forEach((item) => {
                if (items.DEPTID == item) {
                  HQMBs.push(items.DEPTID)
                  HQRYMCs.push(items.DEPT_NAME)
                }
              })
            })
            me.formDataXzdjInfo.HQRYMC = HQRYMCs.join(',')
            me.formDataXzdjInfo.HQBM = HQMBs.join(',')
          }
          if (me.formDataXzdjInfo.QYDWMC) {
            let HQRYMCs = []
            let HQMBs = []
            if (typeof me.formDataXzdjInfo.QYDWMC == 'string') {
              me.formDataXzdjInfo.QYDWMC = me.formDataXzdjInfo.QYDWMC.split(',')
            }
            me.ENUM.CHBMARR.forEach((items) => {
              me.formDataXzdjInfo.QYDWMC.forEach((item) => {
                if (items.TYSHXYDM == item) {
                  HQMBs.push(items.TYSHXYDM)
                  HQRYMCs.push(items.COMAPNY_NAME)
                }
              })
            })
            me.formDataXzdjInfo.QYDWMC = HQRYMCs.join(',')
            me.formDataXzdjInfo.QYDWID = HQMBs.join(',')
          }
          let params1 = {
            accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
            params: {
              dataGuid: 'a0e224e8-36be-4591-b770-30cabda3514a',
              strParams: JSON.stringify([me.formDataXzdjInfo]),
              token: window.localStorage.getItem('token')
            }
          }
          FileServerProxy(params1).then((item) => {
            resolve(item)
          })
        } else {
          if (me.formDataXzdjInfo.HQRYMC) {
            let HQRYMCs = []
            let HQMBs = []
            if (typeof me.formDataXzdjInfo.HQRYMC == 'string') {
              me.formDataXzdjInfo.HQRYMC = me.formDataXzdjInfo.HQRYMC.split(',')
            }
            me.ENUM.TKBMARR.forEach((items) => {
              me.formDataXzdjInfo.HQRYMC.forEach((item) => {
                if (items.DEPTID == item) {
                  HQMBs.push(items.DEPTID)
                  HQRYMCs.push(items.DEPT_NAME)
                }
              })
            })
            me.formDataXzdjInfo.HQRYMC = HQRYMCs.join(',')
            me.formDataXzdjInfo.HQBM = HQMBs.join(',')
          }
          if (me.formDataXzdjInfo.QYDWMC) {
            let HQRYMCs = []
            let HQMBs = []
            if (typeof me.formDataXzdjInfo.QYDWMC == 'string') {
              me.formDataXzdjInfo.QYDWMC = me.formDataXzdjInfo.QYDWMC.split(',')
            }
            me.ENUM.CHBMARR.forEach((items) => {
              me.formDataXzdjInfo.QYDWMC.forEach((item) => {
                if (items.TYSHXYDM == item) {
                  HQMBs.push(items.TYSHXYDM)
                  HQRYMCs.push(items.COMAPNY_NAME)
                }
              })
            })
            me.formDataXzdjInfo.QYDWMC = HQRYMCs.join(',')
            me.formDataXzdjInfo.QYDWID = HQMBs.join(',')
          }
          let params2 = {
            accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
            params: {
              dataGuid: 'a0e224e8-36be-4591-b770-30cabda3514a',
              strParams: JSON.stringify([me.formDataXzdjInfo]),
              token: window.localStorage.getItem('token')
            }
          }
          FileServerProxy(params2).then((items) => {
            resolve(items)
          })
        }
      }).catch()
      }
      function p3(){
      return  new Promise((resolve, reject) => {
        //告知书
        if (me.isADDNCSJTJS == 'add') {
          this.formNCZJSJTJS.TO_ROW_GUID = this.formData.ROW_GUID
          let params3 = {
            accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
            params: {
              dataGuid: '4611c0f9-6653-4e58-bf17-27a9ac28461d',
              strParams: JSON.stringify([me.formNCZJSJTJS]),
              token: window.localStorage.getItem('token')
            }
          }
          FileServerProxy(params3).then((items) => {
            resolve(items)
          })
        } else {
          let params4 = {
            accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
            params: {
              dataGuid: '4611c0f9-6653-4e58-bf17-27a9ac28461d',
              strParams: JSON.stringify([me.formNCZJSJTJS]),
              token: window.localStorage.getItem('token')
            }
          }
          FileServerProxy(params4).then((itemss) => {
            resolve(itemss)
          })
        }
      })
      }
      function p4(){
     return   new Promise((resolve, reject) => {
        //保存踏勘宅基地平面位置坐落图
        if (me.formDataXzdjInfo.HXT) {
          let data1 = {
            'a0e224e8-36be-4591-b770-30cabda3514a': [
              {
                PKID: me.formDataXzdjInfo.PKID,
                ROW_GUID: me.formDataXzdjInfo.ROW_GUID,
                HXT: me.formDataXzdjInfo.HXT,
                eca_RowState: 'modified'
              }
            ]
          }
          let par = {
            formData: JSON.stringify(data1),
            viewParameter: {}
          }
          let params1 = {
            accessCode: '688bd3883572440a859dfd8ba9194e7b11',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
            params: par
          }
          FileServerProxy(params1).then((item) => {
            resolve(item)
          })
        }else{
          resolve();
        }
      })
      }
      Promise.all([p1(), p2(), p3(), p4()]).then((result) => {
        debugger
        console.log(result)
        if (
          JSON.parse(result[0].data.data) &&
          JSON.parse(result[0].data.data).Success &&
          JSON.parse(result[1].data.data) &&
          JSON.parse(result[1].data.data).Success &&
          JSON.parse(result[2].data.data) &&
          JSON.parse(result[2].data.data).Success
        ) {
          if (type == 'Submit') {
            if (me.formDataXzdjInfo.ZTR && me.formDataXzdjInfo.TKRY && me.formDataXzdjInfo.RECONTIME && me.tableDataTKYJ.length > 0) {
              this.submitData()
            } else {
              this.$toast.fail('请输入必填项!')
            }
          } else {
            this.$toast.success('保存成功!')
          }
        } else {
          this.$toast.fail('保存失败!')
        }
      })
    },
    //提交
    submitData() {
      if (this.ISSign == '否') {
        this.$toast.fail('未签到,请签到或前往【审核情况】是否签到修改为是则继续批转！')
        return
      }
      if (this.formData.NODE_GUID === '{67241083-CA60-43FC-B1C1-1F4A2D133184}') {
        this.$router.push({
          path: '/treeSelectzls',
          query: {
            data: { TASK_ID: this.formData }
          }
        })
      }
      //node-guid为{5E1AD806-7824-4196-8ADF-E231A8704FD3}发送时企业、踏勘部门和农户互斥
      else if (this.formData.NODE_GUID === '{5E1AD806-7824-4196-8ADF-E231A8704FD3}') {
        this.$nextTick(function () {
          let CHDW1 = [],
            TKDW1 = []
          if (this.formDataXzdjInfo.SFXZHQBM == 5 || this.formDataXzdjInfo.SFQY == 5) {
            var TKDW = '',CHDW = '' //this.formDataXzdjInfo.QYDWMC
            if (typeof this.formDataXzdjInfo.QYDWMC == 'string') {
              CHDW = this.formDataXzdjInfo.QYDWMC.split(',')
            }
            if (typeof this.formDataXzdjInfo.HQRYMC == 'string') {
              TKDW = this.formDataXzdjInfo.HQRYMC.split(',')
            }
            if (CHDW) {
              this.ENUM.CHBMARR.forEach((item) => {
                CHDW.forEach((items) => {
                  if (item.TYSHXYDM == items) {
                    CHDW1.push(item)
                  }
                })
              })
            }
            if (TKDW) {
              this.ENUM.TKBMARR.forEach((item) => {
                TKDW.forEach((items) => {
                  if (item.DEPTID == items) {
                    TKDW1.push(item)
                  }
                })
              })
            }
          }
          this.$router.push({
            path: '/TreeSelect1',
            query: {
              data: this.formData,
              CHDW: CHDW1,
              TKDW: TKDW1
            }
          })
        })
      } else {
        this.$nextTick(function () {
          this.$router.push({
            path: '/TreeSelect1',
            query: {
              data: this.formData
            }
          })
        })
      }
    },
    setValue1(name, value) {
      console.log(name)
      this.formNCZJSJTJS.SPSJ3 = name
    },
    setValue2(name, value) {
      this.formNCZJSJTJS.IF_BZGZS = value
      console.log(this.formNCZJSJTJS.IF_BZGZS)
    },
    setValue3(name, value) {
      this.formNCZJSJTJS.IF_TJS = value
      console.log(this.formNCZJSJTJS.IF_TJS)
    },
    setValue5(name, value) {
      debugger
      this.formDataTKYJ.SIGNDATE = name
    },
    setValue4(name, value) {
      debugger
      this.formDataApply.GHQ = value
      //console.log(this.formTKCG.GHQ)
    },
    //退回
    blackTable: async function () {
      this.$confirm({
        title: '提示',
        message: '是否确定要退件',
        btn: {
          okText: '确定',
          cancelText: '取消'
        }
      })
        .then(() => {
          // do something
          this.tuijian()
        })
        .catch(() => {
          console.log('no')
        })
    },
    async tuijian() {
      this.$router.push({
        path: '/tuijian',
        query: {
          isTuiHui: true,
          data: JSON.stringify(this.formData)
        }
      })
    },
    //获取农村住房条件书
    async getNCSJTJS() {
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: '4611c0f9-6653-4e58-bf17-27a9ac28461d',
          searchObject: JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.formData.ROW_GUID,
              operator: '='
            }
          ])
        }
      }
      const res = await FileServerProxy(params)
      let data = JSON.parse(res.data.data).Data
      if (data.length > 0) {
        this.formNCZJSJTJS = data[0]
        this.isADDNCSJTJS = 'edit'
      } else {
        this.NCSJTJS = 'add'
      }
    },
    onConfirm19(value) {
      console.log(value, 'hhh')
      this.formDataXzdjInfo.BUILDSTOREY = value.DICID
      this.buildstorey = value.DICNAME
      this.ENUM.YDLX1 = false
    },
    onConfirm20(value) {
      debugger
      this.formDataXzdjInfo.XZJDCZQK_JS = value.DICID
      this.ENUM.TXJS1 = false
    },
    onConfirm21(value) {
      this.formDataXzdjInfo.X_XZJDCZQK = value.DICID
      ;(this.formDataXzdjInfo.X_XZJDCZQK_QT = ''), (this.formDataXzdjInfo.XZJDCZQK_MJ = '')
      this.formDataXzdjInfo.XZJDCZQK_JS = ''
      this.ENUM.ZDJS1 = false
    },
    onConfirm22(value) {
      this.formDataXzdjInfo.X_F_IFSILINGYIJIAN = value.DICID
      this.ENUM.ISSLYJ = false
    },
    async getTableData() {
      let data = [{ field: 'TO_ROW_GUID', value: this.formData.ROW_GUID }]
      const res = await GSA_Search('af4270e8-e122-41b8-971a-6e4e2eaa5760', data)
      if (res.Data.length > 0) {
        this.isADD1 = false
        this.tableData = res.Data
      } else {
        this.isADD1 = true
      }
      console.log(res, 'ikdnhiehnihn')
    },
    async handleAddusers(data) {
      if (data == '添加') {
        this.isShow10 = true
      } else {
        this.$confirm({
          title: '提示',
          message: '确认删吗？',
          btn: {
            okText: '确定',
            cancelText: '取消'
          }
        })
          .then(() => {
            // do something
            this.getMessage1()
          })
          .catch(() => {
            console.log('no')
          })
      }
    },
    //添加踏勘意见
    async handleAddTKYJ(data) {
      this.ISTKYJAdd = ''
      if (data == '添加') {
        this.isShow11 = true
        this.ISTKYJAdd = 'add'
      } else if (data == '修改') {
        this.isShow11 = true
        this.formDataTKYJ = this.multipleSelection11[0]
        this.ISTKYJAdd = 'edit'
      } else {
        this.$confirm({
          title: '提示',
          message: '确认删吗？',
          btn: {
            okText: '确定',
            cancelText: '取消'
          }
        })
          .then(() => {
            // do something
            this.getMessageDeleteTKYJ()
          })
          .catch(() => {
            console.log('no')
          })
      }
    },

    async getMessage1() {
      let params = {
        accessCode: '77ad6c1591e54d4fbc45ecc90374a2a210',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: 'af4270e8-e122-41b8-971a-6e4e2eaa5760',
          strParams: JSON.stringify([{ PKID: this.multipleSelection10[0].PKID }]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      if (JSON.parse(res.data.data).Success) {
        this.getTableData()
      }
    },
    //修改踏勘意见
    async updateTKYJ() {
      let me = this
      if (me.multipleSelection11.length == 1) {
        me.formDataTKYJ.PKID = me.multipleSelection11[0].PKID
        me.formDataXzdjInfo.ROW_GUID = me.multipleSelection11[0].ROW_GUID
        let params6 = {
          accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
          params: {
            dataGuid: 'd0146d58-57cb-4346-ab33-ff082c3c5ad6',
            strParams: JSON.stringify([me.formDataTKYJ]),
            token: window.localStorage.getItem('token')
          }
        }
        const res6 = await FileServerProxy(params6)
        if (JSON.parse(res6.data.data).Success) {
          this.getTKYJ()
        }
      } else {
        this.$toast.fail('请选择一条记录修改！')
      }
    },
    //删除踏勘意见
    async getMessageDeleteTKYJ() {
      debugger
      let me = this
      console.log(me.multipleSelection11[0],'me.multipleSelection11[0]')
      if (me.multipleSelection11.length == 1) {
        let params = {
          accessCode: '434b72c2945518775ee423268b0b8121',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            dataguid: 'd0146d58-57cb-4346-ab33-ff082c3c5ad6',
            strParams: JSON.stringify([{ SIGNID: me.multipleSelection11[0].SIGNID, ROW_GUID: me.multipleSelection11[0].ROW_GUID }]),
            token: window.localStorage.getItem('token')
          }
        }
        const res = await FileServerProxy(params)
        if (JSON.parse(res.data.data).Success) {
          this.getTKYJ()
        }
      } else {
        this.$toast.fail('请选择一条记录删除！')
      }
    },
    //保存踏勘意见
    async saveBtnTKYJ() {
      this.formDataTKYJ.TODATA_GUID = this.formData.ROW_GUID
      this.formDataTKYJ.SORTNUM = 118
      if (this.ISTKYJAdd == 'add') {
        let params5 = {
          accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
          params: {
            dataGuid: 'd0146d58-57cb-4346-ab33-ff082c3c5ad6',
            strParams: JSON.stringify([this.formDataTKYJ]),
            token: window.localStorage.getItem('token')
          }
        }
        const res5 = await FileServerProxy(params5)
        this.tableDataTKYJ.push(this.formDataTKYJ)
        this.formDataTKYJ = {
          OPINION: '',
          SIGNDATE: '',
          SIGNERNAME: ''
        }
      } else {
        this.updateTKYJ()
      }
    },
    cancelBtnTKYJ() {
      this.formDataTKYJ = {
        OPINION: '',
        SIGNDATE: '',
        SIGNERNAME: ''
      }
    },
    async saveBtn() {
      let uuid1 = uuidv4()
      this.formData19.TO_ROW_GUID = this.formData.ROW_GUID
      const date = await GSA_Add('af4270e8-e122-41b8-971a-6e4e2eaa5760', true, this.formData19)
      this.tableData.push(this.formData19)
      this.formData19 = {
        CLMC: '',
        YJFYJ: '',
        FS: '',
        BZ: ''
      }
    },
    cancelBtn() {
      this.formData19 = {
        CLMC: '',
        YJFYJ: '',
        FS: '',
        BZ: ''
      }
    },
    handleSelectionChange10(val) {
      this.multipleSelection10 = val
    },
    //踏勘意见
    handleSelectionChange11(val) {
      this.multipleSelection11 = val
    },
    //获取是否已签到接口
    async getSignInData() {
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: 'a5f81f3b-afc3-4eeb-a2f5-9676b1e8a788',
          searchObject: JSON.stringify([
            { field: 'TO_ROW_GUID', value: this.formData.ROW_GUID, operator: '=' },
            {
              field: 'SIGNINPERSONID',
              value: JSON.parse(window.localStorage.getItem('userName')).userId
            }
          ])
        }
      }
      const res = await FileServerProxy(params)
      if (JSON.parse(res.data.data).Data.length > 0) {
        this.ISSign = '是'
      } else {
        this.ISSign = '否'
      }
    },
    getIFSILINGYIJIAN: async function () {
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: '313d5ddd-2c1b-4f55-82e1-84d5effd9c47',
          searchObject: JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.formData.ROW_GUID,
              operator: '='
            }
          ]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      let data = JSON.parse(res.data.data).Data
      this.showZDZLQL = data[0].F_IFSILINGYIJIAN_DICNAME
    },
    getSignIn() {
      if (this.ISSign == '是') {
        this.$router.push({
          path: './signIn',
          query: {
            longitude: this.formData.PERMANENTADDR,
            // longitude:"惠州市杭州市",
            Range: 112169400,
            data: JSON.stringify(this.formData)
          }
        })
      } else {
        this.$toast.fail('已签到')
      }
    },
    fileOpen(item) {
      dd.ready(function () {
        dd.openLink({
          url: item.url
        })
          .then((res) => {})
          .catch((err) => {
            console.error(err)
          })
      })
    },
    onClickLeft() {
      this.hideMap = true
    },
    //获取现宅基地情况
    async getJJDData() {
      let data = [
        {
          field: 'ROW_GUID',
          value: this.formData.ROW_GUID
        }
      ]
      const res = await GSA_Search('7a676879-10c7-41eb-88c0-2beb7b111158', data)
      console.log(res, 'xiaohehua')
      this.formData1 = res.Data[0]
    },
    getDituUrl() {
      // let node = '',
      //   type = ''
      // let cityCode = this.formData.TOWN
      // let data = [
      //   {
      //     JDID: '' + this.formData.NODE_GUID + '',
      //     SQBH: '' + this.formData.ROW_GUID + '',
      //     FWBH: '' + this.formData.FAMILYHOUSEID + '',
      //     APPLICANT: '' + this.formData.HOUSEAPPLICANT + '',
      //     ADDESS: null,
      //   },
      // ]
      // if (this.formData.WF_GUID == '{9FF1C524-B55F-4A45-83B3-6EA46CF32092}') {
      //   //建房审批
      //   if (
      //     this.formData.NODE_GUID == '{5E1AD806-7824-4196-8ADF-E231A8704FD3}' ||
      //     this.formData.NODE_GUID == '{67241083-CA60-43FC-B1C1-1F4A2D133184}'
      //   ) {
      //     //现场踏勘
      //     node = 'takan'
      //     type = 'edit'
      //   } else {
      //     node = 'takan'
      //     type = 'view'
      //   }
      // }
      // this.MapUrl =
      //   window.g.MapUrl +
      //   '?jieduan=' +
      //   node +
      //   '&data=' +
      //   encodeURIComponent(JSON.stringify(data)) +
      //   '&type=' +
      //   type +
      //   '&user=' +
      //   cityCode
      // this.hideMap = false
      this.$router.push({
        path: '/mapContainer',
        query: {
          data: JSON.stringify(this.$route.query.data)
        }
      })
    },
    onConfirmRQ(val) {
      let year = val.getFullYear()
      let month = val.getMonth() + 1
      let day = val.getDate()
      let hour = val.getHours()
      let minute = val.getMinutes()
      if (month >= 1 && month <= 9) {
        month = `0${month}`
      }
      if (day >= 1 && day <= 9) {
        day = `0${day}`
      }
      if (hour >= 0 && hour <= 9) {
        hour = `0${hour}`
      }
      if (minute >= 0 && minute <= 9) {
        minute = `0${minute}`
      }
      this.className = 'timeClass'
      this.formTKCG.RECONTIME = `${year}-${month}-${day}`
      this.showPickerq = false
    },
    //获取家庭成员信息
    async getNCData() {
      let data = [
        {
          field: 'TO_ROW_GUID',
          value: this.formData.ROW_GUID
        },
        {
          field: 'TYPE',
          value: '2',
          operator: '<>'
        }
      ]
      const res = await GSA_Search('0d3eacb5-d60b-46e4-a62e-9cf914ffca4a', data)
      console.log(res, 'xioahe')
      if (res.Data.Length > 0) {
        let newArr = []
        res.Data.forEach((item) => {
          if (item.YHZGX2 != '户主') {
            newArr.push(item.XM)
          }
        })
        this.formNCZJSJTJS.JTRY = newArr.join('、')
      }
    },
    async getGHQ() {
      let params = {
        accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataGuid: '8478109f-1194-4126-ab97-b2f927368e7b',
          strParams: JSON.stringify([]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      console.log(res, 'hzl')
    },
    // 提交
    getinsertDataView: async function () {
      debugger
      //this.save('Submit')
      this.saveInfo('Submit')
      // console.log(this.formData.SFST, 'this.formData.SFST')
      // if (this.formData.SFST != '5') {
      //   var parameters = {
      //     f: "json",
      //     outFields: "*",
      //     spatialRel: 'esriSpatialRelIntersects',
      //     where: `sqbh='${this.formData.ROW_GUID}'`,
      //   };
      //   var result = await IfMapToResult(parameters);
      //   if (result && result.data && result.data.features && result.data.features.length > 0) {
      //     //修改属性值
      //     this.updateMap();
      //     this.save('Submit');
      //   } else {
      //     this.$toast.fail('请先绘制图形(上图)!')
      //   }
      // } else {
      //   this.save('Submit');
      // }
      //  var ss= this.IFMapToResultS(this.formData.ROW_GUID)
      //  console.log(ss);
      //  if(this.IFMapToResult(this.formData.ROW_GUID)){
      // //this.save('Submit')
      //  }else{
      // this.$toast.fail('请先绘制图形(上图)!')
      //  }
    },
    //修改是否上图(业务系统)
    updateMap: async function () {
      let xcfycjtex = {
        procName: 'up_updateSFST',
        dtParams: JSON.stringify([{ applyrow_guid: this.formData.ROW_GUID, SFSTTYPE: 5 }]),
        token: window.localStorage.getItem('token')
      }
      let xcfycjtfn = {
        accessCode: '69db6bece3a7480592e2ec753d1e335e',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: xcfycjtex
      }
      await FileServerProxy(xcfycjtfn)
    },
    getNowTime: function () {
      let dateTime
      let yy = new Date().getFullYear()
      let mm = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
      let dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
      let hh = new Date().getHours()
      let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
      let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
      dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss
      return dateTime
    },
    //保存设计条件书
    async saveTJS() {
      this.formNCZJSJTJS.TO_ROW_GUID = this.formData.ROW_GUID
      const date = await GSA_Add('4611c0f9-6653-4e58-bf17-27a9ac28461d', this.isADD, this.formNCZJSJTJS)
    },
    // 保存
    save: async function (type) {
      // let params = {
      //   dataGuid: "8478109f-1194-4126-ab97-b2f927368e7b",
      //   strParams: JSON.stringify([this.formData]),
      //   token: window.localStorage.getItem("token"),
      // };
      // const res = await updateDataView(params);
      //判断有没有农房码
      if (!this.formData.FAMILYHOUSEID) {
        let parmes = {
          accessCode: '170a7b62da0a48ab8bdb19ae81d85b45',
          appKey: '6738b790-69e8-11ec-a673-6805cab640z6',
          cityCode: this.formData.TOWN,
          businessId: this.formData.ROW_GUID
        }
        const res = await farmhouseNumberApply(parmes)
        if (res.data.code == 200) {
          this.formData.FAMILYHOUSEID = res.data.data
        } else {
          this.$toast.fail('生成农房码失败')
          return
        }
      }
      if (this.ISSign == '否') {
        this.$toast.fail('未签到！')
        return
      }
      let params = {
        accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataGuid: '8478109f-1194-4126-ab97-b2f927368e7b',
          strParams: JSON.stringify([this.formData]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      console.log(res, 'hzl')
      // let datas = JSON.parse(res.data.data).Success;
      if ((this.formTKCG.TKRY && this.formTKCG.RECONTIME && this.formTKCG.ZTR && this.formTKCG.TKJG && this.formTKCG.TKYJ) || this.formTKCG.SFXZHQBM == '5' || this.formTKCG.SFQY == '5') {
        let formTKCG = JSON.parse(JSON.stringify(this.formTKCG))
        //踏勘部门显示的时候要是数组，保存的时候要转成字符串
        formTKCG.HQRYMC = this.formTKCG.HQRYMC.join(',')
        formTKCG.QYDWMC = this.formTKCG.QYDWMC.join(',')
        if (this.formTKCG.ROW_GUID) {
          // let params1 = {
          //   dataGuid: "a0e224e8-36be-4591-b770-30cabda3514a",
          //   strParams: JSON.stringify([formTKCG]),
          //   token: window.localStorage.getItem("token"),
          // };
          // const res1 = await updateDataView(params1);
          let params1 = {
            accessCode: '77ad6c1591e54d4fbc45ecc90374a2a2',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
            params: {
              dataGuid: 'a0e224e8-36be-4591-b770-30cabda3514a',
              strParams: JSON.stringify([formTKCG]),
              token: window.localStorage.getItem('token')
            }
          }
          const res1 = await FileServerProxy(params1)
        } else {
          formTKCG['TO_ROW_GUID'] = this.formData.ROW_GUID
          formTKCG['ROW_GUID'] = this.rowGuid
          // let params2 = {
          //   dataGuid: "a0e224e8-36be-4591-b770-30cabda3514a",
          //   strParams: JSON.stringify([formTKCG]),
          //   token: window.localStorage.getItem("token"),
          // };
          // const res2 = await InsertDataView(params2);
          let params2 = {
            accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
            params: {
              dataGuid: 'a0e224e8-36be-4591-b770-30cabda3514a',
              strParams: JSON.stringify([formTKCG]),
              token: window.localStorage.getItem('token')
            }
          }
          const res2 = await FileServerProxy(params2)
        }
        if (this.isSaveFile) {
          let tableDatas = [
            {
              housecode: this.formData.FAMILYHOUSEID,
              TBR: JSON.parse(window.localStorage.getItem('DanDianName')),
              createtime: this.getNowTime(),
              TO_ROW_GUID: this.formData.ROW_GUID,
              ROW_GUID: this.rowGuid
            }
          ]
          let params3 = {
            accessCode: '0fb3f6123d1b4fe6851c99532c463f6f',
            cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
            params: {
              dataGuid: 'a0e224e8-36be-4591-b770-30cabda3514a',
              strParams: JSON.stringify([tableDatas]),
              token: window.localStorage.getItem('token')
            }
          }
          const res3 = await FileServerProxy(params3)
          // let params3 = {
          //   dataGuid: "a0e224e8-36be-4591-b770-30cabda3514a",
          //   strParams: JSON.stringify(tableDatas),
          //   token: window.localStorage.getItem("token"),
          // };
          // const res3 = await InsertDataView(params3);
        }
        if (!type) {
          this.saveTJS()
          this.$toast.success('保存成功!')
        } else {
          //node-guid为{67241083-CA60-43FC-B1C1-1F4A2D133184}为自动批转
          if (this.formData.NODE_GUID === '{67241083-CA60-43FC-B1C1-1F4A2D133184}') {
            this.$router.push({
              path: '/treeSelectzls',
              query: {
                data: { TASK_ID: this.formData }
              }
            })
          }
          //node-guid为{5E1AD806-7824-4196-8ADF-E231A8704FD3}发送时企业、踏勘部门和农户互斥
          else if (this.formData.NODE_GUID === '{5E1AD806-7824-4196-8ADF-E231A8704FD3}') {
            this.$nextTick(function () {
              let CHDW1 = [],
                TKDW1 = []
              if (this.formTKCG.SFXZHQBM == 5 || this.formTKCG.SFQY == 5) {
                var TKDW = this.formTKCG.HQRYMC,
                  CHDW = this.formTKCG.QYDWMC
                this.ENUM.CHBMARR.forEach((item) => {
                  CHDW.forEach((items) => {
                    if (item.ST_ID == items) {
                      CHDW1.push(item)
                    }
                  })
                })
                this.ENUM.TKBMARR.forEach((item) => {
                  TKDW.forEach((items) => {
                    if (item.DEPTID == items) {
                      TKDW1.push(item)
                    }
                  })
                })
              }

              this.$router.push({
                path: '/TreeSelect1',
                query: {
                  data: this.formData,
                  CHDW: CHDW1,
                  TKDW: TKDW1
                }
              })
            })
          } else {
            this.$nextTick(function () {
              this.$router.push({
                path: '/TreeSelect1',
                query: {
                  data: this.formData
                }
              })
            })
          }
        }
      } else {
        this.$toast.fail('请输入必填项!')
      }
    },
    //获取界面所需字典值
    getEnum: async function (viewID) {
      let _this = this
      // 86d6eb80-8bcb-49f6-b5c3-462ac1ae585d	是否
      // a8e5782d-9a59-48e4-b35b-654b9bb667ca	性别
      // db35edee-88e0-4fae-b14a-868ed4beb1d9   建房类型
      // d2ec96d4-b5bc-404a-a9f1-34db915c694b	用地类型
      // b65d1943-66f4-49b1-b759-cd9f079dc0d3	结构类型
      // let token = window.localStorage.getItem("token");
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: viewID,
          searchObject: JSON.stringify([]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      // this.listData = JSON.parse(res.data.data).Data;
      // const res = await dataServerOpenDataView(viewID, [], token);
      switch (viewID) {
        case '86d6eb80-8bcb-49f6-b5c3-462ac1ae585d':
          this.ENUM.SFARR = JSON.parse(res.data.data).Data
          this.ArrayErr = JSON.parse(res.data.data).Data
          break
        case 'db35edee-88e0-4fae-b14a-868ed4beb1d9':
          this.ENUM.JFLXARR = JSON.parse(res.data.data).Data
          break
        case '52215e71-341a-452b-8823-a8d4aae058ab':
          this.ENUM.NYDARR = JSON.parse(res.data.data).Data
          break
        case 'a8e5782d-9a59-48e4-b35b-654b9bb667ca':
          this.ENUM.XBARR = JSON.parse(res.data.data).Data
          // this.ENUM.XBARR.forEach((element) => {
          //   if (element.DICID == _this.formData.SEX) {
          //     _this.sexName = element.DICNAME
          //   }
          // })
          break
        case 'd2ec96d4-b5bc-404a-a9f1-34db915c694b':
          this.ENUM.YDLXARR = JSON.parse(res.data.data).Data
          break
        case 'b65d1943-66f4-49b1-b759-cd9f079dc0d3':
          this.ENUM.JGLXARR = JSON.parse(res.data.data).Data
          break
        case 'f7f359ad-369c-4bf4-892c-294dceb5edef':
          this.ENUM.WSCLFSARR = JSON.parse(res.data.data).Data
          break
        // case '63f488ed-f43d-4166-915b-71d7af7fed2f':
        //   this.ENUM.TKBMARR = JSON.parse(res.data.data).Data
        //   break
        // case 'd4d925da-cfd1-4608-94bb-24789720de0a':
        //   this.ENUM.CHBMARR = JSON.parse(res.data.data).Data
        //   break
        case '9b7e6eba-f7a0-4684-b820-8357dd92ae32':
          debugger
          this.ArrayErr1 = JSON.parse(res.data.data).Data
          break
        case 'a892e0f4-5fd6-42b4-b6c2-6e1fc5ebb5dc':
          this.ENUM.YDLXARR1 = JSON.parse(res.data.data).Data
          break
        case 'd9d4db60-e2f0-429f-b6c7-5cb1e9e6bb2d':
          this.ENUM.TXJSARR1 = JSON.parse(res.data.data).Data
          break
        case '2c478392-9c1b-40da-b941-41e4b8c9d6d3':
          this.ENUM.ZDJCZRR1 = JSON.parse(res.data.data).Data
          break

        default:
          break
      }
    },
    //获取踏勘成果 审核情况
    getTKCG: async function () {
      let dataGuid = 'a0e224e8-36be-4591-b770-30cabda3514a'
      let searchObject = encodeURIComponent(
        JSON.stringify([
          {
            field: 'to_row_guid',
            value: this.formData.ROW_GUID,
            operator: '='
          }
        ])
      )
      // let token = window.localStorage.getItem("token");
      // const res = await dataServerOpenDataView(dataGuid, searchObject, token);
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: 'a0e224e8-36be-4591-b770-30cabda3514a',
          searchObject: JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.formData.ROW_GUID,
              operator: '='
            }
          ]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      // this.listData = JSON.parse(res.data.data).Data;
      let Data = JSON.parse(res.data.data).Data
      if (Data.length > 0) {
        this.formTKCG = Data[0]
        console.log(Data[0].HXT, 'Data[0].HXT')
        //将base64转为文件流
        if (Data[0].HXT) {
          //   let blobs = base64toFile(Data[0].HXT, '红线图')
          //   var img = new Blob([new Int8Array(blobs, 0)], {
          //     type: response.headers['content-type']
          //   }) //type类型可自定义
          this.HXT[0].fileList.push({
            url: 'data:image/jpeg;base64,' + Data[0].HXT,
            isImage: true
          })
        }
      } else {
        this.formTKCG = {
          APPLYTYPE: this.formData.BUILDTYPE,
          YDLX: this.formData.LANDTYPE,
          DL_NYD: this.formData.YDLX_NYD,
          YDLX_NYD_QT: this.formData.YDLX_NYD_QT,
          HOMESTEADAREA: this.formData.HOMESTEADAREA,
          HOUSEFLOORAREA: this.formData.BUILDAREA,
          BUILDAREA: this.formData.HOUSEFLOORAREA,
          BUILDHEIGHT: this.formData.BUILDHEIGHT,
          BUILDSTOREY: this.formData.BUILDSTOREY,
          WSCLFS: this.formData.SEWAGEDISPOSAL,
          STRUCTURETYPE: this.formData.STRUCTURETYPE,
          SPACING: this.formData.SUNSHINEDIST,
          EXTERIORCOLOR: this.formData.WALLCOLOR,
          EAST: this.formData.DZ,
          SOUTH: this.formData.NZ,
          WEST: this.formData.XZ,
          NORTH: this.formData.BZ,
          XLQLR: this.formData.ADJACENTOPINION,
          CONSTRUCITONADDRESS: this.formData.CONSTRUCITONADDRESS,
          TKRY: '',
          RECONTIME: '',
          ZTR: '',
          TKJG: '',
          TKYJ: '',
          SHR: '',
          SHSJ: '',
          SFXZHQBM: this.formData.SFXZHQBM ? this.formData.SFXZHQBM : '5',
          SFQY: this.formData.SFQY
        }
      }
      console.log(this.formTKCG, 'this.formTKCG')
      this.formTKCG.SHR ? '' : (this.formTKCG.SHR = JSON.parse(window.localStorage.getItem('userName')).userName)
      this.formDataXzdjInfo.TKRY ? '' : (this.formDataXzdjInfo.TKRY = JSON.parse(window.localStorage.getItem('userName')).userName)
      this.formTKCG.ZTR ? '' : (this.formTKCG.ZTR = JSON.parse(window.localStorage.getItem('userName')).userName)
      this.formTKCG.SHSJ = this.formTKCG.SHSJ ? this.formTKCG.SHSJ.split(' ')[0] : this.getNowTime().split(' ')[0]
      this.formTKCG.RECONTIME = this.formTKCG.RECONTIME ? this.formTKCG.RECONTIME.split(' ')[0] : this.getNowTime().split(' ')[0]
      this.formTKCG.XLQLR = this.formData.ADJACENTOPINION
      this.formTKCG.WSCLFS = this.formData.SEWAGEDISPOSAL
      this.QYDWMC = this.formTKCG.QYDWMC
        ? this.formTKCG.QYDWMC.split(',').map((i) => {
            return parseInt(i)
          })
        : []
      this.HQRYMC = this.formTKCG.HQRYMC
        ? this.formTKCG.HQRYMC.split(',').map((i) => {
            return parseInt(i)
          })
        : []
      if (this.formData.NODE_GUID == '{67241083-CA60-43FC-B1C1-1F4A2D133184}') {
        this.isShow = true
      }
      let dataGuids = 'e8aa3c29-c6da-48f9-a92b-8b7caf3ea48d'
      let searchObjects = encodeURIComponent(
        JSON.stringify([
          {
            field: 'TODATA_GUID',
            value: this.formData.ROW_GUID,
            operator: '='
          }
        ])
      )
      // const res1 = await dataServerOpenDataView(
      //   dataGuids,
      //   searchObjects,
      //   token
      // );
      let params1 = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: 'e8aa3c29-c6da-48f9-a92b-8b7caf3ea48d',
          searchObject: JSON.stringify([
            {
              field: 'TODATA_GUID',
              value: this.formData.ROW_GUID,
              operator: '='
            }
          ]),
          token: window.localStorage.getItem('token')
        }
      }
      const res1 = await FileServerProxy(params1)
      this.tableDataSH = JSON.parse(res1.data.data).Data
    },
    //获取相关材料
    getFile: async function () {
      let dataGuid = 'a0e224e8-36be-4591-b770-30cabda3514a'
      let searchObject = encodeURIComponent(
        JSON.stringify([
          {
            field: 'to_row_guid',
            value: this.formData.ROW_GUID,
            operator: '='
          }
        ])
      )
      let token = window.localStorage.getItem('token')
      // const res = await dataServerOpenDataView(dataGuid, searchObject, token);
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: 'a0e224e8-36be-4591-b770-30cabda3514a',
          searchObject: JSON.stringify([
            {
              field: 'to_row_guid',
              value: this.formData.ROW_GUID,
              operator: '='
            }
          ]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      let Data = JSON.parse(res.data.data).Data
      this.isSaveFile = true
      if (Data.length > 0) {
        this.rowGuid = Data[0].ROW_GUID
      } else {
        this.rowGuid = this.rowGuid
      }
      let groupGuid = []
      this.isSaveFile = false
      this.fileData.forEach((item) => {
        groupGuid.push(item.groupGuid)
      })
      let params1 = {
        accessCode: '1fdcbce42c6d4748a020feba618d54b8',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '',
        params: {
          groupGuid: groupGuid.join(','),
          toRowGuid: this.rowGuid,
          token: window.localStorage.getItem('token')
        }
      }
      const res1 = await FileServerProxy(params1)
      let data = JSON.parse(res1.data.data).FilesInfo
      // const res1 = await GetFileData({
      //   groupGuid: groupGuid.join(","),
      //   toRowGuid: this.rowGuid,
      // });
      if (data.length > 0) {
        data.forEach((element) => {
          this.fileData.forEach((item) => {
            if (element.GROUPGUID == item.groupGuid) {
              this.getFileUrl(element, item)
              // element["isImage"] = true;
              // element["url"] =
              //   window.g.BaseURL +
              //   "FileServer/api/Preview?token=" +
              //   window.localStorage.getItem("token") +
              //   "&" +
              //   "fileGuid=" +
              //   encodeURIComponent(element.ROW_GUID);
              // item.fileList.push(element);
            }
          })
        })
      }
    },
    //获取附件文件流
    getFileUrl: async function (element, item) {
      let formData = new FormData()
      formData.append('accessCode', '98bcf528966e48ce896a8b3fd02d45d5')
      formData.append('cityCode', window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000')
      formData.append(
        'paramStr',
        JSON.stringify({
          fileGuid: element.ROW_GUID
        })
      )
      let response = await dataTransFilePreview(formData)
      if (response) {
        var img = new Blob([new Int8Array(response.data, 0)], {
          type: response.headers['content-type']
        }) //type类型可自定义
        element['isImage'] = true
        element['url'] = window.URL.createObjectURL(img)
        item.fileList.push(element)
      }
    },
    //相关材料
    getList(item) {
      this.groupGuids = item.groupGuid
    },
    afterRead(file) {
      // 此时可以自行将文件上传至服务器
      this.getFileServerUpload(file.file)
      // this.shuiyin({
      //   url: file.content, //这里传的file是上传的图片文件
      //   content: this.getDate(),
      //   cb: base64Url => {
      //     let fileData = this.dataURLtoFile(base64Url, file.file.name) //转file
      //     this.getFileServerUpload(fileData)
      //   }
      // })
    },
    delectFile: async function (file) {
      // if (file.ROW_GUID) {
      //   const res = await DelectFile({
      //     fileGuid: file.ROW_GUID,
      //     token: window.localStorage.getItem("token"),
      //   });
      // }
      let fileguid = ''
      if (file.ROW_GUID) {
        fileguid = file.ROW_GUID
      } else {
        fileguid = this.fileGuid
      }
      if (fileguid) {
        let params = {
          accessCode: 'ce9b691634de4ebca68dc5bb638d07f4',
          cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
          params: {
            fileGuid: fileguid,
            token: window.localStorage.getItem('token')
          }
        }
        const res = await FileServerProxy(params)
        let data = JSON.parse(res.data.data).Success
        if (data) {
          this.$toast.success('删除成功!')
        }
      }
    },
    getFileServerUpload: async function (file) {
      // let formData = new FormData();
      // formData.append("file", file);
      // formData.append("toRowGuid", this.rowGuid);
      // formData.append("groupGuid", this.groupGuids);
      // formData.append("token", window.localStorage.getItem("token"));
      // const res = await drawImg(formData);
      let data = {
        toRowGuid: this.rowGuid,
        groupGuid: this.groupGuids,
        token: window.localStorage.getItem('token')
      }
      let formData = new FormData()
      formData.append('file', file)
      formData.append('accessCode', '7a3fc061c866434b8475d3775c9ddcea')
      formData.append('cityCode', window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000')
      formData.append('token', window.localStorage.getItem('token'))
      formData.append('paramStr', JSON.stringify(data))
      const res = await dataTransFile(formData)
      let data1 = JSON.parse(res.data.data).FileList
      this.fileGuid = data1[0].FILEGUID
      if (data1[0].FILEGUID) {
        this.$toast.success('上传成功!')
        this.fileData.forEach((item, index) => {
          item.fileList = []
        })
        this.getFile()
      }
    },
    getXianOpenDataView: async function () {
      let dataGuid = 'b65d1943-66f4-49b1-b759-cd9f079dc0d3'
      let searchObject = []
      let token = window.localStorage.getItem('token')
      // const res = await dataServerOpenDataView(dataGuid, searchObject, token);
      let params = {
        accessCode: '688bd3883572440a859dfd8ba9194e7b',
        cityCode: window.localStorage.getItem('citycode') ? window.localStorage.getItem('citycode') : '441300000000',
        params: {
          dataguid: 'b65d1943-66f4-49b1-b759-cd9f079dc0d3',
          searchObject: JSON.stringify([]),
          token: window.localStorage.getItem('token')
        }
      }
      const res = await FileServerProxy(params)
      let Data = JSON.parse(res.data.data).Data
      // if (Data.length>0) {
      //   Data.forEach((item, index) => {
      //     if (this.formData.STRUCTURETYPE == item.DICID) {
      //       this.formData.STRUCTURETYPE = item.DICNAME;
      //     }
      //   });
      // }
      // this.formData.STRUCTURETYPE
    },
    onConfirm1(value) {
      this.formDataXzdjInfo.APPLYTYPE = value.DICID
      this.ENUM.JFLX = false
    },
    onConfirm2(value) {
      this.formDataXzdjInfo.YDLX = value.DICID
      this.ENUM.YDLX = false
    },
    onConfirm3(value) {
      this.formDataXzdjInfo.STRUCTURETYPE = value.DICID
      this.ENUM.JGLX = false
    },
    onConfirm4(value) {
      this.formDataXzdjInfo.XLQLR = value.DICID
      this.ENUM.SF = false
    },
    onConfirm10(value) {
      this.formDataApply.SEX = value.DICID
      this.ENUM.XBARR1 = false
    },
    onConfirm7(value) {
      debugger
      this.formDataApply.SFGHQ = value.GHQKEY
      this.ENUM.SFGHQ = false
    },
    onConfirm5(value) {
      this.formDataXzdjInfo.DL_NYD = value.DICID
      this.ENUM.NYD = false
    },
    onConfirm6(value) {
      this.formDataXzdjInfo.WSCLFS = value.DICID
      this.ENUM.WSCLFS = false
    },
    onConfirm8(value) {
      this.formDataXzdjInfo.SFXZHQBM = value.DICID
      this.ENUM.SF1 = false
      //判断是否显示审核情况
      if (this.formData.NODE_GUID == '{5E1AD806-7824-4196-8ADF-E231A8704FD3}' && this.formDataXzdjInfo.SFXZHQBM == '5') {
        this.isShow = false
      } else {
        this.isShow = true
      }
    },
    onConfirm9(value) {
      this.formDataXzdjInfo.SFQY = value.DICID
      this.ENUM.SF2 = false
      if (this.formData.NODE_GUID == '{5E1AD806-7824-4196-8ADF-E231A8704FD3}' && this.formDataXzdjInfo.SFQY == '5') {
        this.isShow = false
      } else {
        this.isShow = true
      }
    },
    toggle(index) {
      this.$refs.checkboxes[index].toggle()
    },
    toggleAll(val) {
      if (val) {
        this.$refs.checkboxGroup.toggleAll(true)
      } else {
        this.$refs.checkboxGroup.toggleAll()
      }
    },
    toggle1(index) {
      this.$refs.checkboxes1[index].toggle()
    },
    toggleAll1(val) {
      if (val) {
        this.$refs.checkboxGroup1.toggleAll(true)
      } else {
        this.$refs.checkboxGroup1.toggleAll()
      }
    }
  },
  components: {
    FileData,
    upLoad,
    selectPicker,
    lianjianren,
    lianjianrenGTXX,
    base64Upload,
    FramlyData
  }
}
</script>
<style lang="scss" scoped>
#SiteSurveyZzd {
  height: 95vh;
  overflow: auto;
  background: #ffffff;
  font-size: 14px;

  .van-field__label {
    font-weight: bold;
  }

  .title {
    width: 100%;
    height: 50px;
    background: #007aff;
    line-height: 50px;
    text-align: center;
    color: #ffffff;
    font-size: 20px;
    position: relative;
  }

  .top {
    height: 90px;
    background: #ffffff;
    margin-bottom: 20px;
    padding-top: 25px;
    text-align: center;
    font-size: 14px;
  }

  .content {
    width: 100%;
    height: calc(100% - 200px);
    overflow: auto;
    padding: 10px;

    .subTitle {
      width: 100%;
      height: 50px;
      line-height: 50px;
      font-size: 20px;
      position: relative;
      display: flex;
      align-items: center;
      border-bottom: 1px solid #9b9b9b;
      padding-left: 10px;

      .line {
        width: 6px;
        height: 26px;
        background: #3f8ffc;
        display: inline-block;
        margin-right: 10px;
      }
    }
  }

  .inputWrap {
    width: 100%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ebedf0;

    & > span {
      margin-right: 5px;
      margin-top: 15px;
    }
  }

  .titleBtn {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer {
    text-align: center;
    padding: 10px 0;
  }
}
</style>
<style lang="scss">
#SiteSurveyZzd {
  .van-field__control {
    text-align: right !important;
  }

  .van-field__label {
    font-weight: bold;
    // width: 10.2em !important;
    width: auto !important;
  }

  .el-table thead,
  .el-table,
  .el-table__empty-text {
    color: #000;
  }
}
</style>
